package com.su.kddq.utils;

import com.alipay.easysdk.kernel.Config;
import com.su.kddq.constant.PayDataConstant;

/**
 * 支付宝工具
 *
 * @author sx
 */
public class AliPayConfig {

    public static Config getOptions() {

        Config config = new Config();
        config.protocol = "https";
        config.gatewayHost = "openapi.alipay.com";
        config.signType = "RSA2";
        config.appId = "2021002199660263";
        // 为避免私钥随源码泄露，推荐从文件中读取私钥字符串而不是写入源码中
        config.merchantPrivateKey = "MIIEuwIBADANBgkqhkiG9w0BAQEFAASCBKUwggShAgEAAoIBAQDCb8EBmf74hvrukxHzKffW2g3MNbeuLqzSuWjw2KuFSsySMBjn62IcaFRgRw2XMMuHFfxGI5DBddFn+Vl11JiU3Cef+Iz75gChMHvPl6vHYBNNPf340vCJQ1YXzFlinY1f6y4gMmRScKMgXApJMiO2b9ngmodLPkwKn7VMpn9R0Xqx+49TJIazvw9p3IIXDl33Yd38vei4uVV5Kl8kYciqSrs0uTLPnnOio0KWTAMWCiq0JtGK8flpHBpFtR/Q8ShjPKJKDi6ax+a+YFTThMkrUwyNCnf6CAJcP7HkZAY1JrZ5QPm58hfPRShYQ9AK/xTbEc/X+Am6y06I2i8poVxvAgMBAAECgf8FUQj2Aj/2i7pQy7Sx8XPVbCD0dIORP7V6DZfQ/huyiVkOpkIIFWeZX0DvYQH+IFdwWimLwW0z3QTc0vSfRDDn4R00QpeYS7G4tpqsEnmf+gCNHCTVqO7q0eyIug23pJc5CDU6rCYSGwJa4Cln1vcjBevvOEp6xDlQEQ3kCqlwkz2BdSLfMSLfM8hWuEAxHAh1g1xItqWMWkccBRiTvFnh1475hxV2BvNngadrvq2vIRoTJs8OA/ID80lj988OBFQsGag3sNjcifblR64Dc0oayiGCmNDlbL/t+Pugrrt5iOCOsdmIJoYaCrVfHJX92h6OeZhFJEftJIUOTSebkjECgYEA+OQ5YODLHrouv3NJOQRUVt99aqflWzHidslWkrjvD3mnWTdklokmbuW6UEjt1U/zIWEdjjQWJqpPM1pWaYe678HkC61gaD9SVHfrLjuZo4ohXzEQqC8aaq/d/xtL/gCP3oek+0a6+4vtu5icREguDwgxPELBLsIqqDoqtg22nucCgYEAx/1hkB00ijZTznZ9ugWNO3Gh6Ha2g/SUFu4VbXGZ67vcaLEJU4uNhz55GYfs1PGxJm5WqYHb0Z4K/wagkOHfDSPxHUbP+01XXc/N0re7fwwEfdOkvcIfHP+uCowvcCrTHbgfY+Dr7nfMFH0W0SCD0k9tU8Nr2Htrw55eoQFfzTkCgYEA6tMhU8cjvXz6KEXUWwg7rq8z/FImcnFRcrOpi8sSOm6UNvetXt5NtannrGHyiyTghqjDIuz/zUE4coIUL4MRG666w020PQcpXWq7KKaw4Xys2cxII/Y1HV2KvWt6uk67bsBaJ33nYvf1t95X6ZCUbDhVg76T19L4PjqLG7M6jxcCgYAdbRfs548ygvnj2CV5uJVmWLr1BHqogdVEZnW6q8t1FyhAM0RnCZKigru42Pos/v8M45FW0aexeSqvCZ+YkdOLEG3K2/+AP4oKYKgtSCGLeQ40IW8NCMIhNzG5lZTpUTPNHKlpvc+ZQAFERn+T98/Noyg3+folWUuq9eOAlz4saQKBgGaZuTbcS262HUQoyimIQqSlzo3H7j/GJGZ970hKYWGWq7ceM+5zk4viJAPBsAAreidzGniPCxWY4UIUPNq9+NiqLxm25S7VxlWwDu3Xl6clBbPqblE4R/DaCHLGdy2XlENx27m2MSJlVGW9XcCq7DElwA4OnuiQM8mY7vnOMyBk";
        //注：证书文件路径支持设置为文件系统中的路径或CLASS_PATH中的路径，优先从文件系统中加载，加载失败后会继续尝试从CLASS_PATH中加载
        config.merchantCertPath = "/root/alipay/appCertPublicKey_2021002199660263.crt";
        config.alipayCertPath = "/root/alipay/alipayCertPublicKey_RSA2.crt";
        config.alipayRootCertPath = "/root/alipay/alipayRootCert.crt";
        //注：如果采用非证书模式，则无需赋值上面的三个证书路径，改为赋值如下的支付宝公钥字符串即可
        // config.alipayPublicKey = "<-- 请填写您的支付宝公钥，例如：MIIBIjANBg... -->";
        //可设置异步通知接收服务地址（可选）
        config.notifyUrl = PayDataConstant.notify_url;
        //可设置AES密钥，调用AES加解密相关接口时需要（可选）
        //config.encryptKey = "<-- 请填写您的AES密钥，例如：aa4BtZ4tspm2wnXLb1ThQA== -->";
        return config;
    }


}
